//
//  UserAbstractView.h
//  LXFCommon
//
//  Created by lixfey on 2019/3/19.
//  Copyright © 2019 lixfey. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UserAbstractBaseView.h"

@protocol UserAbstractViewDelegate;

NS_ASSUME_NONNULL_BEGIN

@interface UserAbstractView : UIView

#pragma mark -- attribute

/// 基础信息
@property(nonatomic, strong) AbstractBaseModel *baseModel;

/// 用于点击回调传出对应indexPath（用于cell中，不用可不传）
@property(nonatomic, strong) NSIndexPath *indexPath;

@property(nonatomic, weak) id <UserAbstractViewDelegate> delegate;

@end

/**
 * 代理
 */
@protocol UserAbstractViewDelegate <NSObject>

@optional
/**
 点击基础视图回调 (左边名字、头像、简介)

 @param abstractView 当前视图
 @param index select 0 self 1 pic 2 name 3 sex 4 intro （如果点击一整块都跳转，就不判断该标识）
 @param indexPath 传入的indexPath 用于标识点击的位置
 */
- (void)didselectBaseView:(UserAbstractView *)abstractView selectIndex:(NSUInteger)index indexPath:(NSIndexPath *)indexPath;

@end

NS_ASSUME_NONNULL_END
